import org.springframework.beans.factory.FactoryBean;

public class MyBean implements FactoryBean<Student> {
    //定义返回的bean
    public Student getObject() throws Exception {
        Student student = new Student();
        student.setName("zhangsan");
        return student;
    }

    public Class<?> getObjectType() {
        return null;
    }
}
